


<%@page pageEncoding="UTF-8" contentType="text/html; UTF-8" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>添加学生</title>
	<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/back/statics/css/bootstrap.min.css">
	<style>
		.form-control{
			height: 30px;
		}
	</style>
</head>
<body>
<div class="container-fluid">
	<div class="row">
		<div class="col-sm-offset-2 col-sm-8">
			<form action="${pageContext.request.contextPath}/student/updateStudent" method="post">
				<div class="form-group">
					<label>名称:</label>
					<p class="form-control-static">${student.id}</p>
					<input type="hidden" name="student.id" value="${requestScope.student.id}" class="form-control" >
				</div>
				<div class="form-group">
					<label>名称:</label>
					<input type="text" name="student.name" value="${requestScope.student.name}" class="form-control" >
				</div>
				<div class="form-group">
					<label>生日:</label>
					<input type="text" name="student.biryhday" value="${requestScope.student.birthday}" class="form-control" >
				</div>
				<div class="form-group">
					<label>QQ:</label>
					<input type="text" name="student.qq" value="${requestScope.student.qq}" class="form-control" >

				</div>
				<div class="form-group">
					<label>Phone:</label>
					<input type="text" name="student.phone" value="${requestScope.student.phone}" class="form-control">
				</div>
				<div class="form-group">
					<label for="clazz">选择班级-小组:</label>
					<select class="form-control" name="clazzAndGroup" id="clazz">

						<c:forEach items="${groups}" var="group">
							<option value="${group.id}-${group.clazz.id}"
								<c:if test="${student.getClazz().id==group.clazz.id}">
									selected
								</c:if>
							>${group.clazz.name}----${group.name}组(${group.size}人)</option>
						</c:forEach>


					</select>
				</div>
				<div class="form-group">
					<label for="city">就业城市:</label>
					<select class="form-control" name="city.id" id="city">

						<c:forEach items="${cities}" var="city">
							<option value="${city.id}"
									<c:if test="${student.getCity().id==city.id}">
										selected
									</c:if>
							>${city.name}</option>
						</c:forEach>


					</select>
				</div>
				<div class="form-group">
					<label>请选择标签:</label>
					<div class="checkbox">


							<c:forEach items="${requestScope.tags}" var="tag">
								<label style="margin-right: 5px;">
									<input
										<c:forEach items="${student.getTags()}" var="studentTag">
											<c:if test="${studentTag.id==tag.id}">
													checked="checked"
											</c:if>
										</c:forEach>
									type="checkbox" value="${tag.id}" name="tagIds">
									${tag.name}
								</label>
							</c:forEach>




					</div>
				</div>
				<div class="form-group">
					<label>备注:</label>
					<div id="div1">
						
					</div>
					<input name="mark" style="display: none;" id="markContent"/>
				</div>
				<button type="submit" class="btn btn-info btn-block btn-sm">保存学生信息</button>
			</form>
		</div>
	</div>
</div>
</body>
</html>
<script src="https://cdn.jsdelivr.net/npm/wangeditor@latest/dist/wangEditor.min.js"></script>
<script type="text/javascript">
	const E = window.wangEditor
	const editor = new E('#div1');
	editor.config.height = 250;
	editor.create()
</script>
